#ifndef INPUT_BUTTON_H
#define INPUT_BUTTON_H

#include "mid/input/flexible_button.h"

#include <stdint.h>

typedef flex_button_event_t eButtonEvent;

typedef enum eButtonID
{
    USER_BUTTON_UP = 0,
    USER_BUTTON_DOWN,
    USER_BUTTON_LEFT,
    USER_BUTTON_RIGHT,
	USER_BUTTON_MID,
    USER_BUTTON_MAX
} eButtonID;

// @return int      0 - pass event along the chain, ow swallow event
typedef int (*ButtonEventCallback)(eButtonID btnID, eButtonEvent btnEvent);
void InitInput();
void ProcessInput();
int RegisterButtonEventHandler(ButtonEventCallback handler);
void UnRegisterButtonEventHandler(ButtonEventCallback handler);

#endif